#coding=utf-8?
import re
class CourseGradRequire():
    def __init__(self):
        self.major = []
        self.minor = []
        self.weight  = []

        self.graduation_req = {}

    # text: 课程对应毕业要求。例如：
    # '6.5M,8.5M,9.5M,10.5M'
    def load(self, text):
        reqs = re.findall('(\d+)\.(\d+)(\D)', text)
        # [('6', '5', 'M'), ('8', '5', 'M'), ('9', '5', 'M'), ('10', '5', 'M')]
        for req in reqs: # ('6', '5', 'M')
            self.major.append(int(req[0]))
            self.minor.append(int(req[1]))
            self.weight.append(req[2])


if __name__ == '__main__':
    pass